/*
 * This file is part of CAT-SOOP
 * Copyright (c) 2011-2016 Adam Hartz <hartz@mit.edu>
 *
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the Soopycat License, version 1.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the Soopycat License for more details.
 *
 * You should have received a copy of the Soopycat License along with this
 * program.  If not, see <https://smatz.net/soopycat>.
 */

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    src: local('Montserrat-Regular'), url(@{csm_dispatch.get_real_url(globals(), 'BASE/fonts/Montserrat-Regular.woff')}) format('woff'), url(@{csm_dispatch.get_real_url(globals(), 'BASE/fonts/Montserrat-Regular.woff2')}) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}

@font-face {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 400;
    src: local('Lato Regular'), local('Lato-Regular'), url(@{csm_dispatch.get_real_url(globals(), 'BASE/fonts/Lato-Regular.woff')}) format('woff'), url(@{csm_dispatch.get_real_url(globals(), 'BASE/fonts/Lato-Regular.woff2')}) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}

@font-face {
    font-family: 'Computer Modern Typewriter';
    src: url(@{csm_dispatch.get_real_url(globals(), 'BASE/fonts/cmuntt.eot')});
    src: url(@{csm_dispatch.get_real_url(globals(), 'BASE/fonts/cmuntt.eot?#iefix')}) format('embedded-opentype'),
         url(@{csm_dispatch.get_real_url(globals(), 'BASE/fonts/cmuntt.woff')}) format('woff'),
         url(@{csm_dispatch.get_real_url(globals(), 'BASE/fonts/cmuntt.ttf')}) format('truetype'),
         url(@{csm_dispatch.get_real_url(globals(), 'BASE/fonts/cmuntt.svg#cmuntt')}) format('svg');
    font-weight: normal;
    font-style: normal;
}


@font-face {
    font-family: 'Computer Modern Typewriter';
    src: url(@{csm_dispatch.get_real_url(globals(), 'BASE/fonts/cmuntb.eot')});
    src: url(@{csm_dispatch.get_real_url(globals(), 'BASE/fonts/cmuntb.eot?#iefix')}) format('embedded-opentype'),
         url(@{csm_dispatch.get_real_url(globals(), 'BASE/fonts/cmuntb.woff')}) format('woff'),
         url(@{csm_dispatch.get_real_url(globals(), 'BASE/fonts/cmuntb.ttf')}) format('truetype'),
         url(@{csm_dispatch.get_real_url(globals(), 'BASE/fonts/cmuntb.svg#cmuntb')}) format('svg');
    font-weight: bold;
    font-style: normal;
}


@font-face {
    font-family: 'Computer Modern Typewriter';
    src: url(@{csm_dispatch.get_real_url(globals(), 'BASE/fonts/cmunit.eot')});
    src: url(@{csm_dispatch.get_real_url(globals(), 'BASE/fonts/cmunit.eot?#iefix')}) format('embedded-opentype'),
         url(@{csm_dispatch.get_real_url(globals(), 'BASE/fonts/cmunit.woff')}) format('woff'),
         url(@{csm_dispatch.get_real_url(globals(), 'BASE/fonts/cmunit.ttf')}) format('truetype'),
         url(@{csm_dispatch.get_real_url(globals(), 'BASE/fonts/cmunit.svg#cmunit')}) format('svg');
    font-weight: normal;
    font-style: italic;
}


@font-face {
    font-family: 'Computer Modern Typewriter';
    src: url(@{csm_dispatch.get_real_url(globals(), 'BASE/fonts/cmuntx.eot')});
    src: url(@{csm_dispatch.get_real_url(globals(), 'BASE/fonts/cmuntx.eot?#iefix')}) format('embedded-opentype'),
         url(@{csm_dispatch.get_real_url(globals(), 'BASE/fonts/cmuntx.woff')}) format('woff'),
         url(@{csm_dispatch.get_real_url(globals(), 'BASE/fonts/cmuntx.ttf')}) format('truetype'),
         url(@{csm_dispatch.get_real_url(globals(), 'BASE/fonts/cmuntx.svg#cmuntx')}) format('svg');
    font-weight: bold;
    font-style: italic;
}

.catsooplogo {
    font-family: 'Computer Modern Typewriter';
    border-color:transparent;
    font-weight:bold;
    background-color:transparent;
    font-size:110%;
    color:inherit;
    line-height:1.1;
    text-align:center;
}

.cs_base_bold {
    color: @{cs_base_color};
    font-weight: bold;
}

code {
    font-family: 'Computer Modern Typewriter';
    background-color: #eee;
    padding: 2px;
    border-radius: 5px;
    color: inherit;
}

body {
    padding-top:80px;
    font: 400 15px Lato, sans-serif;
    line-height: 1.8;
    color: #000000;
}

h2 {
    font-size: 24px;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 10px;
}
h4 {
    font-size: 19px;
    line-height: 1.375em;
    font-weight: 400;
    margin-top: 30px;
    margin-bottom: 10px;
}
.jumbotron {
    background-color: @{cs_base_color};
    color: #fff;
    padding: 60px 25px 25px 25px;
    font-family: Montserrat;
}
.bg-grey {
    background-color: #f6f6f6;
}
.logo-small {
    color: @{cs_base_color};
    font-size: 50px;
}
.logo {
    color: @{cs_base_color};
    font-size: 200px;
}
.thumbnail {
    padding: 0 0 15px 0;
    border: none;
    border-radius: 0;
}
.thumbnail img {
    width: 100%;
    height: 100%;
    margin-bottom: 10px;
}
.carousel-control.right, .carousel-control.left {
    background-image: none;
    color: @{cs_base_color};
}
.carousel-indicators li {
    border-color: @{cs_base_color};
}
.carousel-indicators li.active {
    background-color: @{cs_base_color};
}
.item h4 {
    font-size: 19px;
    line-height: 1.375em;
    font-weight: 400;
    font-style: italic;
    margin: 70px 0;
}
.item span {
    font-style: normal;
}
.panel {
    border: 1px solid @{cs_base_color};
    border-radius:0 !important;
    transition: box-shadow 0.5s;
}
.panel:hover {
    box-shadow: 5px 0px 40px rgba(0,0,0, .2);
}
.panel-footer .btn:hover {
    border: 1px solid @{cs_base_color};
    background-color: #fff !important;
    color: @{cs_base_color};
}
.panel-heading {
    color: #fff !important;
    background-color: @{cs_base_color} !important;
    padding: 25px;
    border-bottom: 1px solid transparent;
    border-top-left-radius: 0px;
    border-top-right-radius: 0px;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
}
.panel-footer {
    background-color: white !important;
}
.panel-footer h3 {
    font-size: 32px;
}
.panel-footer h4 {
    color: #aaa;
    font-size: 14px;
}
.panel-footer .btn {
    margin: 15px 0;
    background-color: @{cs_base_color};
    color: #fff;
}
.navbar {
    margin-bottom: 0;
    background-color: @{cs_base_color};
    z-index: 1999;
    border: 0;
    font-size: 14px !important;
    line-height: 20 !important;
    border-radius: 0;
    font-family: Montserrat;
}
.navbar code{
    background-color: transparent;
}
.navbar li a{
    color: #fff !important;
}
.navbar .navbar-brand{
    color: #fff !important;
    font-size: 40px;
    float:left;
    vertical-align: middle;
}
.navbar .navbar-brand .logininfo{
    font-size: 12px;
    float:left;
}

.navbar-brand a {
    color: #fff !important;
}

.navbar-brand a:hover {
    text-decoration: none;
}

.navbar-nav li a:hover, .navbar-nav li.active a {
    color: @{cs_base_color} !important;
    background-color: #fff !important;
}
.navbar-default .navbar-toggle {
    border-color: transparent;
    color: #fff !important;
}
.open .dropdown-toggle {
    color: #fff ;
    background-color: @{cs_base_color} !important;
}
.dropdown-menu li a {
    color: @{cs_base_color} !important;
    background-color: #fff;
}
.dropdown-menu li a:hover {
    background-color: @{cs_base_color} !important;
    color: #fff !important;
}
footer .glyphicon {
    font-size: 20px;
    margin-bottom: 20px;
    color: @{cs_base_color};
}
.slideanim {visibility:hidden;}
.slide {
    animation-name: slide;
    -webkit-animation-name: slide;
    animation-duration: 1s;
    -webkit-animation-duration: 1s;
    visibility: visible;
}
@keyframes slide {
  0% {
    opacity: 0;
    -webkit-transform: translateY(70%);
  }
  100% {
    opacity: 1;
    -webkit-transform: translateY(0%);
  }
}
@-webkit-keyframes slide {
  0% {
    opacity: 0;
    -webkit-transform: translateY(70%);
  }
  100% {
    opacity: 1;
    -webkit-transform: translateY(0%);
  }
}
@media screen and (max-width: 768px) {
  .col-sm-4 {
    text-align: center;
    margin: 25px 0;
  }
  .btn-lg {
      width: 100%;
      margin-bottom: 35px;
  }
}
@media screen and (max-width: 480px) {
  .logo {
      font-size: 150px;
  }
}

<python>
clip = lambda x, lo=0, hi=1: min(hi, max(x, lo))
base_hsv = _rgb_to_hsv(_hex_to_rgb(cs_base_color))
light_hsv = (base_hsv[0], clip(base_hsv[1]-0.2), clip(base_hsv[2]+0.2))
cs_light_color = _rgb_to_hex(_hsv_to_rgb(light_hsv))
</python>

.btn-catsoop{color:#fff;background-color:@{cs_base_color};border-color:#000000}
.btn-catsoop.focus,.btn-catsoop:focus{color:#fff;background-color:@{cs_light_color};border-color:#00000}
.btn-catsoop:hover{color:#fff;background-color:@{cs_light_color};border-color:#000000}
.btn-catsoop.active.focus,.btn-catsoop.active:focus,.btn-catsoop.active:hover,.btn-catsoop:active.focus,.btn-catsoop:active:focus,.btn-catsoop:active:hover,.open>.dropdown-toggle.btn-catsoop.focus,.open>.dropdown-toggle.btn-catsoop:focus,.open>.dropdown-toggle.btn-catsoop:hover{color:@{cs_base_color};background-color:#ffffff;border-color:#000000}
.btn-catsoop.active,.btn-catsoop:active,.open>.dropdown-toggle.btn-catsoop{background-image:none}


pre {
  white-space: pre-wrap;       /* css-3 */
  white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
  white-space: -pre-wrap;      /* Opera 4-6 */
  white-space: -o-pre-wrap;    /* Opera 7 */
  word-wrap: normal;       /* Internet Explorer 5.5+ */
  font-family: 'Computer Modern Typewriter';
}

img {vertical-align:middle; max-width:100%;}
table {margin-bottom: 20px;}
td,th {padding:5px; vertical-align:middle;}

.equal {
  width: 100%;
  display:table;
  border-collapse:separate;
  max-width:1100px;
}

.hints {
  width: 90%;
  display: block;
  background-color: #ffffff;
  border-style: dashed;
  border-width: 1px;
  padding: 10px;
  margin-bottom: 20px;
  margin-top: 5px;
  margin-left: auto;
  margin-right: auto;
}

.aside_left {
    display: block;
    float: left;
    width: 60px;
    height: 50px;

    background-color: #FFD9D9;
    border-color: #FF0000;
    border-style: solid;
    border-width: 1px;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 20px;
    margin-top: 5px;
    margin-left: auto;
    margin-right: auto;
    transition: height 0.5s;
    -webkit-transition: height 0.5s;
    text-align: center;
    overflow: hidden;
    z-index:0;
}

.aside_left:hover{
    overflow:visible;
    z-index:100;
    height: 145px;
    width: 145px;
}

.aside_right{
    display: block;
    float: right;
    width: 270px;
    height: 400px;
    border: 1px solid red;

}

input {
font-family:     "Courier New",
                    "Courier",
                    monospace;
}

textarea {
font-family:     "Courier New",
                    "Courier",
                    monospace;

}

svg {
  vertical-align: middle;
}

tt {
  font-family: 'Computer Modern Typewriter';
}

a {
  font-weight: normal;
  color: @{cs_base_color};
}

a:hover {
  text-decoration: underline;
  font-weight: normal;
  color: #FFFFFF;
  background-color: @{cs_base_color};
}

li {
  margin-top:3px;
}

#content_header {
  font-size: 16pt;
  color: #000000;
  font-weight: bold;
  margin-bottom:12pt;
}

.response {
 width:90%;
 padding:10px;
 margin-top:20px;
 margin-bottom:20px;
 margin-right:auto;
 margin-left:auto;
 background-color: #ffffff;
 border-color: #000000;
 border-style: solid;
 border-width: 1px;
 border-radius: 10px;
}

.question {
 width:90%;
 padding:15px;
 margin-top:20px;
 margin-bottom:20px;
 margin-right:auto;
 margin-left:auto;
 background-color: #ffffff;
 border-color: #000000;
 border-style: solid;
 border-width: 1px;
 border-radius: 10px;
}


.checkoff {
 width:90%;
 padding:10px;
 margin-top:20px;
 margin-bottom:20px;
 margin-right:auto;
 margin-left:auto;
 background-color: #ddddff;
 border-color: #000000;
 border-style: solid;
 border-width: 3px;
 border-radius: 10px;
}


.critical {
 width:90%;
 padding:10px;
 margin-top:20px;
 margin-bottom:20px;
 margin-right:auto;
 margin-left:auto;
 background-color: #FFD9D9;
 border-color: #FF0000;
 border-style: solid;
 border-width: 1px;
 border-radius: 10px;
}

.note {
 width:90%;
 padding:10px;
 margin-top:20px;
 margin-bottom:20px;
 margin-right:auto;
 margin-left:auto;
 background-color: #ccffff;
 border-color: #000000;
 border-style: solid;
 border-width: 1px;
 border-radius: 10px;
}

.background {
 width:90%;
 padding:10px;
 margin-top:20px;
 margin-bottom:20px;
 margin-right:auto;
 margin-left:auto;
 background-color: #D3D3D3;
 border-color: #000000;
 border-style: solid;
 border-width: 1px;
 border-radius: 10px;
}

.questionForStaff {
 width:90%;
 padding:10px;
 margin-top:20px;
 margin-bottom:20px;
 margin-right:auto;
 margin-left:auto;
 background-color: #ffe900;
 border-color: #FF0000;
 border-style: solid;
 border-width: 1px;
 border-radius: 10px;
}

.solution {
 width:90%;
 padding:10px;
 margin-top:20px;
 margin-bottom:20px;
 margin-right:auto;
 margin-left:auto;
 background-color: #dbffdc;
 border-color: #005702;
 border-style: solid;
 border-width: 1px;
 border-radius: 10px;
}

.impsolution {
 width:90%;
 padding:10px;
 margin-top:20px;
 margin-bottom:20px;
 margin-right:auto;
 margin-left:auto;
 background-color: #FFD9D9;
 border-color: #FF0000;
 border-style: solid;
 border-width: 1px;
 border-radius: 10px;
}

/* This ACE stuff shouldn't live here, probably */
.embedded_ace_code {
    left: 0px;
    top: 0px;
    bottom: 1px;
    right: 1px;
    background: #fff;
}

.ace_editor_wrapper {
   height: 275px;
   position: relative;
   border: 1px solid #DDD;
   border-radius: 4px;
   border-bottom-right-radius: 0px;
   margin-top: 5px;
}

#side_menu {
  float: left;
  display: block;
  width: calc(20% - 20px);
  max-width:220px;
  margin: 0px;
  padding: 10px;
  color: #000000;
}

#bottom_menu {
  background-color: #FFFFFF;
  width: calc(100% - 20px);
  height: 20px;
  vertical-align: middle;
  padding-right: 10px;
  padding-left: 10px;
  text-align: right;
}

#bottom_menu a{
  color: #000000;
}

#bottom_menu a:hover{
  color: #FFFFFF;
  background-color: #000000;
}

.printonly{
    display: none;
}

.noprint{
    display:inline;
}

/* FOOTER */

#footer {
    text-align: center;
    color: #000000;
    font-size: 10pt;
    background-color: #f5f5f5;
    border: solid 1px #ccc;
    border-radius: 1px;
    width: 100%;
    padding: 10px;
}

#footer pre{
    border-color: transparent;
    background-color: transparent;
    padding-bottom: 0px;
}

.loader {
  display: inline-block;
  vertical-align:middle;
  font-size: 10px;
  text-indent: -9999em;
  border-top: 1.1em solid rgba@{_hex_to_rgb(cs_base_color) + (0.2, )};
  border-right: 1.1em solid rgba@{_hex_to_rgb(cs_base_color) + (0.2, )};
  border-bottom: 1.1em solid rgba@{_hex_to_rgb(cs_base_color) + (0.2, )};
  border-left: 1.1em solid @{cs_base_color};
  -webkit-transform: translateZ(0);
  -ms-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-animation: load8 1.1s infinite linear;
  animation: load8 1.1s infinite linear;
}
.loader,
.loader:after {
  border-radius: 50%;
  width: 1em;
  height: 1em;
  margin-top: auto;
  margin-bottom: auto;
}
@-webkit-keyframes load8 {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
@keyframes load8 {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

.breadcrumb {
    background-color: transparent;
}

/* Printed Style */

@media print {
    body * {
        visibility: hidden;
    }

    #content * {
        visibility: visible;
    }

    #content {
        visibility: visible;
        background-color: white;
        position: absolute;
        left:0px;
        top:0px;
    }

    .pagebreak{
        page-break-after: always;
    }

    .noprint{
        display:none;
    }

    .printonly{
        display:inline;
        visibility: visible;
    }

    [id^="queue_"]{
        display:none;
    }

    .question{
        page-break-inside: avoid;
    }

    [name="cs_footnotes"]{
        page-break-before: always;
    }

}
